<div class="modal fade" id="resolveIncidentModal-{{key}}" tabindex="-1" role="dialog"
     aria-labelledby="resolveIncidentModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">

        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Resolve Incident</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            <div class="modal-body">

                <div class="form-group">
                    <label class="col-form-label">Make sure that you fixed the error</label>
                    <input type="text" class="form-control" value="{{errorMessage}}" readonly>
                </div>

                {{#jobKey}}
                <div class="form-group">
                    <label class="col-form-label">Remaining Retries</label>
                    <input id="remaining-retries-{{key}}" type="number" min="0" class="form-control" value="1"/>
                </div>
                {{/jobKey}}

            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

                {{#jobKey}}
                <button type="button" class="btn btn-primary" data-dismiss="modal"
                        onclick="resolveJobIncident({{key}}, {{jobKey}})">Resolve
                </button>
                {{/jobKey}}

                {{^jobKey}}
                <button type="button" class="btn btn-primary" data-dismiss="modal"
                        onclick="resolveProcessInstanceIncident({{key}})">Resolve
                </button>
                {{/jobKey}}

            </div>

        </div>
    </div>
</div>